@extends('default.layouts.adminPublic')
@section('title'){{Site::get('webkey') . '|' . Site::get('webname') . '后台管理系统' }} @endsection
@section('headcss')
    @parent
    <link rel="stylesheet" href="{{asset('/default/css/admin/adminHome.css')}}">
@endsection
@section('content')
        <!--导航开始-->
<div class="crumb_warp">
    <i class="fa fa-home"></i> <a href="{{url('admin')}}">首页</a> &raquo; 基本信息
</div>
<!--导航结束-->

<!--结果集标题与导航组件 开始-->
<div class="result_wrap">
    <div class="result_title">
        <h3>快捷操作</h3>
    </div>
    <div class="result_content">
        <div class="short_wrap">
            <a href="{{ url('admin/news/create') }}"><i class="fa fa-plus"></i>发布资讯</a>
            <a href="{{ url('admin/toplushcache') }}"><i class="fa fa-recycle"></i>更新缓存 </a>
            <a href="#"><i class="fa fa-refresh"></i>更新排序</a>
            <span class="green">{{ session("message") }}</span>

        </div>
    </div>
</div>
<!--结果集标题与导航组件 结束-->

<div class="result_wrap">
    <div class="result_title">
        <h3>系统基本信息</h3><h3>系统运维信息</h3>
    </div>
    <div class="result_content">
        <ul>
            <li>
                <label>操作系统</label><span>{{@PHP_OS}} PHP{{@PHP_VERSION}}</span>
            </li>
            <li>
                <label>未处理队列</label>
                <span>
                    @if($data['untreated_job'] > $threshold)
                        <em class="numWarning">{{ $data['untreated_job'] }}条</em><i class="warning jobWarning"></i>
                        <input type="hidden" id="untreatedJob" value="1">
                    @else
                        <em>{{ $data['untreated_job'] }}条</em>
                        <input type="hidden" id="untreatedJob" value="0">
                    @endif
                </span>
            </li>
        </ul>
        <ul>
            <li>
                <label>运行环境</label><span>{{$_SERVER['SERVER_SOFTWARE'] or ''}}</span>
            </li>
            <li>
                <label>错误队列</label>
                <span>
                    @if($data['warning_job'] > $threshold)
                        <em class="numWarning">{{ $data['warning_job'] }}条</em><i class="warning jobWarning"></i>
                        <input type="hidden" id="warningJob" value="1">
                    @else
                        <em>{{ $data['warning_job'] }}条</em>
                        <input type="hidden" id="warningJob" value="0">
                    @endif
                </span>
            </li>
        </ul>
        <ul>
            <li>
                <label>版本</label><span>{{config('cms.version')}}</span>
            </li>
            <li>
                <label>今日登陆企业用户数</label>
                <span>{{ $data['company_login'] }}个</span>
            </li>
        </ul>
        <ul>
            <li>
                <label>上传附件限制</label><span>{{ get_cfg_var("upload_max_filesize") ? get_cfg_var("upload_max_filesize") : "不允许上传附件"}}</span>
            </li>
            <li>
                <label>今日登陆个人用户数</label>
                <span>{{ $data['person_login'] }}个</span>
            </li>
        </ul>
        <ul>
            <li>
                <label>北京时间</label><span class="nowDateTimeEm">loading...</span>
                <input type="hidden" id="nowDateTimeInput" value="{{ round(time()*1000) }}">
                <input type="hidden" id="nowDateTimeHasPassInput" value="0">
            </li>
            @if ($xs == 1)
                <li>
                    <label>迅搜简历偏差</label>
                    <span>
                        @if ($data['xs_job'] === false)
                            <em class="noData">未开启迅搜</em>
                            <input type="hidden" id="xsJob" value="0">
                        @else
                            @if($data['xs_job'] > $threshold)
                                <em>{{ $data['xs_job'] }}条</em><i class="warning xsWarning"></i>
                                <input type="hidden" id="xsJob" value="1">
                            @else
                                <em>{{ $data['xs_job'] }}条</em>
                                <input type="hidden" id="xsJob" value="0">
                            @endif
                        @endif
                    </span>
                </li>
            @endif
        </ul>
        <ul>
            <li>
                <label>服务器域名/IP</label><span>{{$_SERVER['SERVER_NAME'] or ''}} [ {{$_SERVER['SERVER_ADDR'] or ''}}]</span>
            </li>
            @if ($xs == 1)
                <li>
                    <label>迅搜职位偏差</label>
                    <span>
                        @if ($data['xs_job'] === false)
                            <em class="noData">未开启迅搜</em>
                            <input type="hidden" id="xsResume" value="0">
                        @else
                            @if($data['xs_resume'] > $threshold)
                                <em>{{ $data['xs_resume'] }}条</em><i class="warning xsWarning"></i>
                                <input type="hidden" id="xsResume" value="1">
                            @else
                                <em>{{ $data['xs_resume'] }}条</em>
                                <input type="hidden" id="xsResume" value="0">
                            @endif
                        @endif
                    </span>
                </li>
            @endif
        </ul>
    </div>
</div>

<div class="result_wrap">
    <div class="result_title">
        <h3>数据报表</h3>
    </div>
    <div class="result_content" style="overflow: hidden;">
        <div class="left">
            <div id="resume_new" class="report"></div>
            <div id="resume_send" class="report"></div>
            <div id="resume_dl" class="report"></div>
        </div>
        <div class="right">
            <div id="company_new" class="report"></div>
            <div id="job_new" class="report"></div>
            <div id="job_browse" class="report"></div>
        </div>


    </div>
</div>

<div class="result_wrap">
    <div class="result_title">
        <h3>使用帮助</h3>
    </div>
    <div class="result_content">
        <ul>
            <li>
                <label>官方交流网站：</label><span><a href="http://www.1wyun.com">http://www.1wyun.com</a></span>
            </li>
            <li>
                <label>官方交流QQ群：</label><span><a href="#"><img border="0" src="http://pub.idqqimg.com/wpa/images/group.png"></a></span>
            </li>
        </ul>
    </div>
</div>
<!--结果集列表组件 结束-->
@endsection
@section('footerjs')
    @parent
    <script type="text/javascript" src="{{asset('/default/js/echarts.min.js')}}"></script>
    <script type="text/javascript" src="{{asset('/default/js/admin/now_time.js')}}"></script>
    <script type="text/javascript" src="{{asset('/default/js/admin/home.js')}}"></script>
    <script type="text/javascript">
        var csrf_token = "{{csrf_token()}}";//全局定义csrf_token
        var getNowTimeUrl = "{{ url('admin/get_now_time') }}";
        var getReportDataUrl = "{{ url('admin/get_report_data') }}";
        var xs = "{{ $xs }}";
        var threshold = "{{ $threshold }}";
    </script>
@endsection
